<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<c:set var="grant_code"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
<c:set var="sub_grant_code"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>

<div class="t_bar">活动基本情况</div>
<table class="table01 t_css" width="100%" border="0" cellpadding="0" cellspacing="1">
	<tr>
	    <td width="20%" align="right"><span class="color_red">*</span>活动名称：</td>
		<td colspan="3">
			<input  name="proposal/zh_title" label="活动名称" type="text" 
					class="required " maxlength=50 style="text-align:left;width:725px;" 
					value="<x:out select="$xmlData/data/proposal/zh_title" />" /> 
		</td>
	</tr>
	<tr>
	    <td width="20%" align="right"><span class="color_red">*</span>活动批准部门：</td>
		<td colspan="3">
			<input  name="activity/dept" label="活动批准部门" type="text" 
					class="required"  style="text-align:left;width:725px;"  maxlength=50
					value="<x:out select="$xmlData/data/activity/dept" />" /> 
		</td>
	</tr>
	<tr>
	    <td width="20%" align="right"><span class="color_red">*</span>主办单位：</td>
		<td colspan="3">
			<input  name="activity/org_name" label="主办单位" type="text" 
					class="required " maxlength=50 style="text-align:left;width:725px;" 
					value="<x:out select="$xmlData/data/activity/org_name" />" /> 
		</td>
	</tr>
	<tr>
	    <td width="20%" align="right"><span class="color_red">*</span>承办单位：</td>
		<td colspan="3">
			<input  name="activity/undertake_org_name" label="承办单位" type="text" 
					class="required " maxlength=50 style="text-align:left;width:725px;" 
					value="<x:out select="$xmlData/data/activity/undertake_org_name" />" /> 
		</td>
	</tr>
	<tr>
	    <td width="20%" align="right"><span class="color_red">*</span>协办单位：</td>
		<td colspan="3">
			<input  name="activity/co_org_name" label="协办单位" type="text" 
					class="required "  maxlength=50 style="text-align:left;width:725px;" 
					value="<x:out select="$xmlData/data/activity/co_org_name" />" /> 
		</td>
	</tr>
	<tr>
	    <td width="20%" align="right"><span class="color_red">*</span>支持单位：</td>
		<td colspan="3">
			<input  name="activity/support_org_name" label="支持单位" type="text" 
					class="required " maxlength=50 style="text-align:left;width:725px;" 
					value="<x:out select="$xmlData/data/activity/support_org_name" />" /> 
		</td>
	</tr>
	<tr>
	    <td width="20%" align="right"><span class="color_red">*</span>活动时间：</td>
		<td colspan="1">
			<c:set var="activity_date"><x:out select="$xmlData/data/activity/activity_date" /></c:set> 
			<cpt:date id="activity_date" name="activity/activity_date" value="${activity_date}"  
			      className="required date" label="活动时间">
			</cpt:date>
		</td>
		<td width="20%" align="right"><span class="color_red">*</span>举办地点：</td>
		<td colspan="1">
			<input  name="activity/hold_addr" label="举办地点" type="text" 
					class="required " maxlength=50 style="text-align:left;width:395px;" 
					value="<x:out select="$xmlData/data/activity/hold_addr" />" /> 
		</td>
	</tr>
	<tr>
	    <td nowrap  align="right" ><span class="color_red">*</span>活动开展情况：</td>
	    <td colspan="1">
	       <label><input type="radio" name="exhibition"  class="do" value="1" onclick="radioClean(this,'exhibition_sum')">首次</label>
	       <label><input type="radio" name="exhibition"  class="do" value="2" onclick="radioClean(this,'exhibition_sum')">第</label><input 
			      name="activity/exhibition_sum" label="活动开展情况次数" type="text"  id="exhibition_sum"
			      class="input_css "  style="text-align:right;width: 50px;" onfocus="InitInput.setNumber(this,7,0,0)"
			      value="<x:out select="$xmlData/data/activity/exhibition_sum" />" />次
	              <input type="hidden" id='exhibition_value' name="activity/exhibition_value" class="required"  label="活动开展情况"  value="<x:out select="$xmlData/data/activity/exhibition_value" />">	
	              <input type="hidden" name="activity/exhibition_name" value="<x:out select="$xmlData/data/activity/exhibition_name" />">	
	    </td>
	    <td nowrap  align="right" ><span class="color_red">*</span>活动开展形式：</td>
	    <td colspan="1">
	       <label><input type="radio" name="exhibition_type"  class="do" value="1" onclick="radioClean(this,'exhibition_type_sum')" >不定期</label>
	       <label><input type="radio" name="exhibition_type"  class="do" value="2" onclick="radioClean(this,'exhibition_type_sum')" >定期每</label><input 
			      name="activity/exhibition_type_sum" label="活动开展形式次数" type="text" 
			      class="input_css"   maxlength="50"  id="exhibition_type_sum"
			      value="<x:out select="$xmlData/data/activity/exhibition_type_sum" />" />一次
	       <input type="hidden" id='exhibition_type_value' name="activity/exhibition_type_value" class="required"  label="活动开展形式"  value="<x:out select="$xmlData/data/activity/exhibition_type_value" />">	
	       <input type="hidden" name="activity/exhibition_type_name" value="<x:out select="$xmlData/data/activity/exhibition_type_name" />">	
	    </td>
	</tr>
	<tr>
	    <td nowrap  align="right" ><span class="color_red">*</span>收费方式：</td>
	    <td colspan="3">
	       <label><input type="radio" name="charging"  class="do" value="1" >不收费</label>
	       <label><input type="radio" name="charging"  class="do" value="2" >收费</label>
	              <input type="hidden" id='charging_value' name="activity/charging_value" class="required"  label="收费方式"  value="<x:out select="$xmlData/data/activity/charging_value" />">	
	              <input type="hidden" name="activity/charging_name" value="<x:out select="$xmlData/data/activity/charging_name" />">	
	    </td>
	</tr>
	<tr>
	    <td nowrap  align="right" ><span class="color_red">*</span>主要参加对象：（限500字）</td>
	    <td colspan="3">
	        <textarea id="brief" name="activity/main_participants"
				rows='15' cols='120' class="required textarea maxlength:500"
				label="主要参加对象" ><x:out select="$xmlData/data/activity/main_participants" /></textarea>
			<input name="activity/main_participants_hidden" value="" type="hidden"/>
 	    </td>
	</tr>
	<tr>
	    <td width="20%" align="right"><span class="color_red">*</span>参加人数：</td>
		<td colspan="3">
			<input  name="activity/psn_count" label="参加人数" type="text" 
					class="required "  style="text-align:right;" 
					onfocus="InitInput.setNumber(this,7,0,0)"
					value="<x:out select="$xmlData/data/activity/psn_count" />" />人
		</td>
	</tr>
</table>
<br/>
<table class="table01 t_css" width="100%" border="0" cellpadding="0" cellspacing="1">
<tr><th colspan="2" width="50%"><span class="color_red">*</span>活动支出（万元）</th>
<th colspan="2" width="50%"><span class="color_red">*</span>经费来源（万元）</th> </tr>
    <tr>
        <th width="14%">场地费</th>
		<td  align='left' width="36%">
	      <input id="activity_expend_site" name="activity_expend/site" label="场地费" type="text"
				   class="input_text required maxlength:20"  
				   style="text-align:right;width:250px;"
				   onfocus="InitInput.setNumber(this,7,4,2)"
				   value="<x:out select="$xmlData/data/activity_expend/site" />" 
				   onchange="countFundAuto('activity_expend_','site,guests,receive,conference,propaganda,other','total');"  />
	    </td>
	    
        <th  width="14%">单位自筹</th>
		<td  align='left' width="36%">
	      <input id="activity_source_self" name="activity_source/self" label="单位自筹" type="text"
				   class="input_text required maxlength:20"  
				   style="text-align:right;width:250px;"
				   onfocus="InitInput.setNumber(this,7,4,2)"
				   value="<x:out select="$xmlData/data/activity_source/self" />" 
				   onchange="countFundAuto('activity_source_','self,allow,sponsor,adv,fee,other','total');"  />
	    </td>
	</tr>
	
	<tr>
	    <th  width="14%">嘉宾费用</th>
		<td  align='left' width="36%">
	      <input id="activity_expend_guests" name="activity_expend/guests" label="嘉宾费用" type="text"
				   class="input_text required maxlength:20"  
				   style="text-align:right;width:250px;"
				   onfocus="InitInput.setNumber(this,7,4,2)"
				   value="<x:out select="$xmlData/data/activity_expend/guests" />" 
				   onchange="countFundAuto('activity_expend_','site,guests,receive,conference,propaganda,other','total');"  />
	    </td>
	     <th  width="14%">政府补贴</th>
		<td  align='left' width="36%">
	      <input id="activity_source_allow" name="activity_source/allow" label="政府补贴" type="text"
				   class="input_text required maxlength:20"  
				   style="text-align:right;width:250px;"
				   onfocus="InitInput.setNumber(this,7,4,2)"
				   value="<x:out select="$xmlData/data/activity_source/allow" />" 
				   onchange="countFundAuto('activity_source_','self,allow,sponsor,adv,fee,other','total');"  />
	    </td>
	</tr>
	<tr>
	    <th  width="14%">接待费</th>
		<td  align='left' width="36%">
	      <input id="activity_expend_receive" name="activity_expend/receive" label="接待费" type="text"
				   class="input_text required maxlength:20"  
				   style="text-align:right;width:250px;"
				   onfocus="InitInput.setNumber(this,7,4,2)"
				   value="<x:out select="$xmlData/data/activity_expend/receive" />" 
				   onchange="countFundAuto('activity_expend_','site,guests,receive,conference,propaganda,other','total');"  />
	    </td>
	    <th  width="14%">商业赞助</th>
		<td  align='left' width="36%">
	      <input id="activity_source_sponsor" name="activity_source/sponsor" label="商业赞助" type="text"
				   class="input_text required maxlength:20"  
				   style="text-align:right;width:250px;"
				   onfocus="InitInput.setNumber(this,7,4,2)"
				   value="<x:out select="$xmlData/data/activity_source/sponsor" />" 
				   onchange="countFundAuto('activity_source_','self,allow,sponsor,adv,fee,other','total');"  />
	    </td>
	</tr>
	<tr> 
	    <th  width="14%">会务费</th>
		<td  align='left' width="36%">
	      <input id="activity_expend_conference" name="activity_expend/conference" label="会务费" type="text"
				   class="input_text required maxlength:20"  
				   style="text-align:right;width:250px;"
				   onfocus="InitInput.setNumber(this,7,4,2)"
				   value="<x:out select="$xmlData/data/activity_expend/conference" />" 
				   onchange="countFundAuto('activity_expend_','site,guests,receive,conference,propaganda,other','total');"  />
	    </td>
	     <th  width="14%">广告收入</th>
		<td  align='left' width="36%">
	      <input id="activity_source_adv" name="activity_source/adv" label="广告收入" type="text"
				   class="input_text required maxlength:20"  
				   style="text-align:right;width:250px;"
				   onfocus="InitInput.setNumber(this,7,4,2)"
				   value="<x:out select="$xmlData/data/activity_source/adv" />" 
				   onchange="countFundAuto('activity_source_','self,allow,sponsor,adv,fee,other','total');"  />
	    </td>
	</tr>
	<tr>
	    <th  width="14%">宣传费</th>
		<td  align='left' width="36%">
	      <input id="activity_expend_propaganda" name="activity_expend/propaganda" label="宣传费" type="text"
				   class="input_text required maxlength:20"  
				   style="text-align:right;width:250px;"
				   onfocus="InitInput.setNumber(this,7,4,2)"
				   value="<x:out select="$xmlData/data/activity_expend/propaganda" />" 
				   onchange="countFundAuto('activity_expend_','site,guests,receive,conference,propaganda,other','total');"  />
	    </td>
	    <th  width="14%">活动收费</th>
		<td  align='left' width="36%">
	      <input id="activity_source_fee" name="activity_source/fee" label="活动收费" type="text"
				   class="input_text required maxlength:20"  
				   style="text-align:right;width:250px;"
				   onfocus="InitInput.setNumber(this,7,4,2)"
				   value="<x:out select="$xmlData/data/activity_source/fee" />" 
				   onchange="countFundAuto('activity_source_','self,allow,sponsor,adv,fee,other','total');"  />
	    </td>
	 </tr>
	 <tr>
	    <th  width="14%">其它</th>
		<td  align='left' width="36%">
	      <input id="activity_expend_other" name="activity_expend/other" label="其它" type="text"
				   class="input_text required maxlength:20"  
				   style="text-align:right;width:250px;"
				   onfocus="InitInput.setNumber(this,7,4,2)"
				   value="<x:out select="$xmlData/data/activity_expend/other" />" 
				   onchange="countFundAuto('activity_expend_','site,guests,receive,conference,propaganda,other','total');"  />
	    </td>
	    <th  width="14%">其它</th>
		<td  align='left' width="36%">
	      <input id="activity_source_other" name="activity_source/other" label="其它" type="text"
				   class="input_text required maxlength:20"  
				   style="text-align:right;width:250px;"
				   onfocus="InitInput.setNumber(this,7,4,2)"
				   value="<x:out select="$xmlData/data/activity_source/other" />" 
				   onchange="countFundAuto('activity_source_','self,allow,sponsor,adv,fee,other','total');"  />
	    </td>
	 </tr>
	 <tr>
	    <th  width="14%">合计</th>
		<td  align='left' width="36%">
	      <input id="activity_expend_total" name="activity_expend/total"  type="text"
				   class="input_text gray" disabled  
				   style="text-align:right;width:250px;"
				   onfocus="InitInput.setNumber(this,7,4,2)"
				   value="<x:out select="$xmlData/data/activity_expend/total" />" />
	    </td>
	     <th  width="14%">合计</th>
		<td  align='left' width="36%">
	      <input id="activity_source_total" name="activity_source/total"  type="text"
				   class="input_text gray" disabled  
				   style="text-align:right;width:250px;"
				   onfocus="InitInput.setNumber(this,7,4,2)"
				   value="<x:out select="$xmlData/data/activity_source/total" />" />
	    </td>
    </tr>
</table>
<script>
$(document).ready (function() {
	radioClean(document.getElementById("exhibition_value"),'exhibition_sum');
	radioClean(document.getElementById("exhibition_type_value"),'exhibition_type_sum');
});

function radioClean(obj,string){
	if(obj.value==2){
		$("#"+string).attr("disabled",false);
		$("#"+string).addClass("required");
		
	}
	else{
		$("#"+string).attr("disabled",true);
		$("#"+string).removeClass("required");
		$("#"+string).val("");
	}
}
</script>